<template>
  <!-- 横滑图文 -->
  <div class="h-img-text">
    <div class="h-img-box">
      <div v-for="i in 4" :key="i" class="img-text-item">
        <div class="cover-img">
          <img :src="img" />
          <div class="cover">
            <div class="view-num">123123</div>
          </div>
        </div>
        <p class="title single-line-ellipsis">
          土狗的陆地头等舱正片土狗的陆地头等舱正片土狗的陆地头等舱正片
        </p>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    props: {
      list: {
        type: Array,
        default: () => [],
      },
    },
    data() {
      return {
        img:
          'https://jimu-dev-pub.oss-cn-shanghai.aliyuncs.com/image/1234/F10A30C428624FFEA0ABA30C1222A40B.png',
      };
    },
    methods: {},
  };
</script>
<style lang="less" scoped>
  .h-img-text {
    ::-webkit-scrollbar {
      background: transparent;
      width: 0;
    }
    ::-webkit-scrollbar-thumb {
      background: transparent;
    }
    ::-webkit-scrollbar-track-piece {
      background: transparent;
    }
    .h-img-box {
      display: flex;
      overflow-y: scroll;
      width: 100%;
      .img-text-item {
        &:first-child {
          margin-left: 4rem;
        }
        &:last-child {
          padding-right: 4rem;
        }
        margin-right: 3rem;
        // width: 28.3rem;
        .cover-img {
          width: 28.3rem;
          height: 16rem;
          border-radius: 2rem;
          overflow: hidden;
          position: relative;
          // margin-right: 2.0rem;
          flex: none;
          margin-bottom: 2rem;
          .cover {
            height: 8rem;
            padding: 1.5rem;
            .view-num {
              position: absolute;
              bottom: 1.5rem;
            }
          }
          img {
            width: 28.3rem;
            height: 16rem;
            border-radius: 2rem;
          }
        }
        .title {
          color: var(--textBrightColor);
          line-height: 4rem;
          font-size: 2.8rem;
          font-weight: 800;
        }
      }
    }
  }
</style>
